package com.example.demo.service;

import com.example.demo.mapper.InformationsMapper;
import com.example.demo.pojo.Informations;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.Date;
import java.util.List;
@Service
@Transactional
public class InformationsServiceImpl implements InformationsService{
    @Autowired
    InformationsMapper informationsMapper;
    @Override
    public List<Informations> getAllInformations() {
        return informationsMapper.selectAllInformations();
    }

    @Override
    public Informations getInformationsById(Integer id) {
        return informationsMapper.selectInformationsById(id);
    }

    @Override
    public int changeInformations(Informations informations) {
        return informationsMapper.updateInformations(informations);
    }
}
